<template>
  <div>
    <Dialog>
      <template #[slotName]>
        头部
      </template>
      <template #default="{data,index}">
        <div>
          {{ data.name }} - {{ data.age }} - {{ index }}
        </div>
      </template>
      <template v-slot:footer>
        <div>
          底部
        </div>
      </template>
    </Dialog>
  </div>
</template>

<script setup lang=ts>
import { ref } from "vue";
import Dialog from "./index.vue"

const slotName = ref('header')
</script>

<style scoped></style>